#!/usr/bin/python
"""The app for hosting nodes."""

from gaweb import common
from gaweb.node import helpers
from gaweb.node import model


def main():
    config = helpers.read_config()  # let error propogate
    common.setup_logging(config)

    helpers.patch_path()

    node_server = model.NodeServer()
    try:
        node_server.serve_forever()
    finally:
        node_server.shutdown()


if __name__ == '__main__':
    main()
